package com.iflytek.aisol.audit.iflytek.strategy.manage.mapper.fr;

import cn.hutool.core.bean.BeanUtil;
import com.iflytek.aisol.audit.iflytek.strategy.manage.entity.FrChannelConfigServerInstance;
import com.iflytek.aisol.audit.iflytek.strategy.manage.entity.FrGrayConfigServerInstance;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author : hswang7
 * @date : 2025/1/2
 * @description :
 */
@Repository
public interface FrChannelConfigServerInstanceMapper extends JpaRepository<FrChannelConfigServerInstance, Long> {

    @Query("SELECT g FROM FrChannelConfigServerInstance g WHERE g.channelConfigId = :id")
    List<FrChannelConfigServerInstance> findByChannelConfigId(@Param("id") Long id);

    @Query("SELECT g FROM FrChannelConfigServerInstance g WHERE g.serverInstanceId = :id")
    List<FrChannelConfigServerInstance> findWithInstanceId(@Param("id") Long id);

}
